﻿using System;
using System.Collections.Generic;
using ZOIL.DataModel;
using ZOIL.Library.Behaviors;

namespace Sample.PhotoBrowser.Components
{
    [ViewModelFor(typeof(FlickrPhotoView))]
    public class FlickrPhotoViewModel : ConnectionBaseViewModel
    {
        public FlickrPhotoViewModel()
        {
        }

        public new FlickrPhoto Model
        {
            get
            {
                return base.Model as FlickrPhoto;
            }
            set
            {
                base.Model = value;
            }
        }

        #region Properties

        public String Title
        {
            get
            {
                return Model.Title;
            }
            set
            {
                Model.Title = value;
                RaisePropertyChanged("Title");
            }
        }

        public List<String> Tags
        {
            get
            {
                return Model.Tags;
            }
            set
            {
                Model.Tags = value;
                RaisePropertyChanged("Tags");
            }
        }

        public String Description
        {
            get
            {
                return Model.Description;
            }
            set
            {
                Model.Description = value;
                RaisePropertyChanged("Description");
            }
        }

        public String UserName
        {
            get
            {
                return Model.UserName;
            }
            set
            {
                Model.UserName = value;
                RaisePropertyChanged("UserName");
            }
        }

        public DateTime DateUploaded
        {
            get
            {
                return Model.DateUploaded;
            }
            set
            {
                Model.DateUploaded = value;
                RaisePropertyChanged("DateUploaded");
            }
        }

        public string BuddyIconUrl
        {
            get
            {
                return Model.BuddyIconUrl;
            }
            set
            {
                Model.BuddyIconUrl = value;
                RaisePropertyChanged("BuddyIconUrl");
            }
        }

        public int Views
        {
            get
            {
                return Model.Views;
            }
            set
            {
                Model.Views = value;
                RaisePropertyChanged("Views");
            }
        }

        public String PhotoId
        {
            get
            {
                return Model.PhotoId;
            }
            set
            {
                Model.PhotoId = value;
                RaisePropertyChanged("PhotoId");
            }
        }

        public string SmallUrl
        {
            get
            {
                return Model.SmallUrl;
            }
            set
            {
                Model.SmallUrl = value;
                RaisePropertyChanged("SmallUrl");
            }
        }
        #endregion
    }
}
